const TimeNotesBase = require("./TimeNotesBase");

class Codebook extends TimeNotesBase {
    constructor(dbName, valiFormEnum) {
        super(dbName, valiFormEnum)
    }
    sortResult(list) {
        return list.sort((a, b) =>
            a.letter > b.letter ? 1 : -1
        )
    }
}

// 表单验证
const valiFormEnum = {
    title: '请填写标题',
    account: '请填写账号',
    password: '请填写密码',
    about: '',
    letter: ''
}
const ex = new Codebook('codebook_list', valiFormEnum);
module.exports = ex